package com.weitu.permission.authority.entity;

import java.io.Serializable;

/**
 * Table: SYS_AUTHORITY_RESOURCE
 */
public class AuthorityResource implements Serializable {
    /**
     * Column: SYS_AUTHORITY_RESOURCE.authorityId
     */
    private String authorityId;

    /**
     * Column: SYS_AUTHORITY_RESOURCE.resourceId
     */
    private String resourceId;

    private String resourceName;

    /**
     * Table: SYS_AUTHORITY_RESOURCE
     */
    private static final long serialVersionUID = 1L;

    public String getAuthorityId() {
        return authorityId;
    }

    public void setAuthorityId(String authorityId) {
        this.authorityId = authorityId == null ? null : authorityId.trim();
    }

    public String getResourceId() {
        return resourceId;
    }

    public void setResourceId(String resourceId) {
        this.resourceId = resourceId == null ? null : resourceId.trim();
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AuthorityResource that = (AuthorityResource) o;

        if (authorityId != null ? !authorityId.equals(that.authorityId) : that.authorityId != null) return false;
        if (resourceId != null ? !resourceId.equals(that.resourceId) : that.resourceId != null) return false;
        return resourceName != null ? resourceName.equals(that.resourceName) : that.resourceName == null;
    }

    @Override
    public int hashCode() {
        int result = authorityId != null ? authorityId.hashCode() : 0;
        result = 31 * result + (resourceId != null ? resourceId.hashCode() : 0);
        result = 31 * result + (resourceName != null ? resourceName.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("AuthorityResource{");
        sb.append("authorityId='").append(authorityId).append('\'');
        sb.append(", resourceId='").append(resourceId).append('\'');
        sb.append(", resourceName='").append(resourceName).append('\'');
        sb.append('}');
        return sb.toString();
    }
}